package oakclub.background;

import oakclub.entity.BackgroundEntity;
import org.gearman.GearmanFunction;
import org.gearman.GearmanFunctionCallback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CreateUserBackground extends BaseBackground implements GearmanFunction
{
    private final Logger logger = LoggerFactory.getLogger(CreateUserBackground.class);

    @Override
    public byte[] work(String s, byte[] bytes, GearmanFunctionCallback gearmanFunctionCallback) throws Exception
    {
        this.logger.info("CreateUserBackground");
        this.execute(bytes, new IExecute()
        {
            @Override
            public void execute(BackgroundEntity entity) throws Exception
            {
                // params
                long userId = (long) entity.getParam("user_id");
            }
        });
        return null;
    }
}
